import { IModalConfig } from '@/components/page-modal/type'
import { FormType } from '@/base-ui/base-form/type'
import { ActionDesc } from '@/global/constant'

const userListModalBanned: IModalConfig = {
  modalProps: {
    title: '账号封禁',
    closable: false,
    maskClosable: false,
    keyboard: false,
    width: 430
  },
  formProps: {
    desc: ActionDesc.UserBanned,
    layout: { span: 24 },
    formConfig: {
      name: 'user-banned',
      size: 'middle',
      labelAlign: 'right',
      initialValues: {
        type: 0
      },
      labelCol: { flex: '80px' },
      colon: false
    },
    itemsConfig: [
      {
        type: FormType.Radio,
        prop: 'type',
        name: 'type',
        label: '类型',
        radio: {
          options: [
            { value: 0, content: '限时' },
            { value: 1, content: '永久' }
          ]
        }
      },
      {
        type: FormType.TextArea,
        prop: 'bannedCause',
        name: 'bannedCause',
        label: '封禁原因',
        rules: [{ required: true }],
        textArea: {
          placeholder: '请输入封禁原因'
        }
      },
      {
        type: FormType.DatePicker,
        prop: 'time',
        name: 'time',
        label: '结束时间',
        rules: [{ required: true }],
        date_picker: {
          showTime: true
        }
      }
    ]
  }
}
export default userListModalBanned
